<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>
<c:import url="billingStat.jsp" />
<table class="cntable table table-bordered dataTable table-billing">
	<thead>
		<tr>
			<th style="width:50px">序号</th>			
			<th style="width:80px">订单号</th>
			<th style="width:60px">客户</th>
			<th style="width:50px">商品编码</th>
			<th style="width:50px">商品名称</th>
			<th style="width:60px">商品规格</th>
			<th style="width:60px">数量</th>
			<th style="width:60px">单位</th>
			<th style="width:60px">单价</th>
			<th style="width:60px">进价</th>
			<th style="width:60px">销售额</th>
			<th style="width:60px">成本</th>
			<th style="width:60px">毛利</th>
			<th style="width:60px">毛利率</th>
			<th style="width:60px">发货时间</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="billingDetailed" items="${billingDetaileds}" varStatus="status">
			
			<tr data-id="">
				<td>${status.index+1}</td>
				<td>${billingDetailed.billingNo}</td>
				<td>${billingDetailed.customerName}</td>
				<td>${billingDetailed.cargoCode}</td>
				<td>${billingDetailed.cargoName}</td>
				<td>${billingDetailed.cargoSize}</td>
				<td>${billingDetailed.billingAmount}</td>
				<td>${billingDetailed.cargoUnit}</td>
				<td>${billingDetailed.unitPrice}</td>
				<td>${billingDetailed.costPrice}</td>
				<td><fmt:formatNumber value="${billingDetailed.unitPrice*billingDetailed.billingAmount}" pattern="0.00"></fmt:formatNumber></td>
				<td><fmt:formatNumber value="${billingDetailed.costPrice*billingDetailed.billingAmount}" pattern="0.00"></fmt:formatNumber></td>
				<td><fmt:formatNumber value="${(billingDetailed.unitPrice-billingDetailed.costPrice)*billingDetailed.billingAmount}" pattern="0.00"></fmt:formatNumber></td>
				<td><fmt:formatNumber value="${(billingDetailed.unitPrice-billingDetailed.costPrice)/billingDetailed.unitPrice}" pattern="0.00"></fmt:formatNumber></td>
				<td style="width:100px">
						<fmt:formatDate value="${billingDetailed.deliveryTime}" type="date" dateStyle="default" pattern="yyyy-MM-dd"/>
				</td>
			</tr>
		</c:forEach>
	</tbody>
	<tfoot>
		<tr>
			<th class="pager-th">
				<%@ include file="/WEB-INF/views/shared/master/pager.jsp"%>
			</th>
		</tr>
	</tfoot>
</table>
